import { Proxy } from './proxy'

export { DriverOperationDto } from './dto/driverOperationDto'
export { DriverDto } from './dto/driverDto'
export { Proxy } from './proxy'

const desktopBaseUrl = '/app/desktop/home';


export async function GetProxy(){ 
    const proxy = new Proxy();
    await proxy.init();
    return proxy;
} 


export async function openWithFolder(path: string){

    let url = new URL(desktopBaseUrl, window.location.origin);
    url.searchParams.set('action', 'de_execute');
    url.searchParams.set('driver_id', '1');  
    url.searchParams.set('operation_id', '1');  
    url.searchParams.set('path', encodeURIComponent(path)); // 编码路径 
    window.open(url.toString(), '_blank');

}


 